<!DOCTYPE html>
<html>

  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0" />
    <meta name="format-detection" content="telephone=no" />
    <meta content="yes" name="mobile-web-app-capable">
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>智立方后台管理</title>
    <link rel="stylesheet" type="text/css" th:href="@{css/backstage/layui.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{css/font_awesome.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{css/backstage/bootstrap.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{plugins/fileupload/css/iconfont.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{plugins/fileupload/css/fileUpload.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{css/backstage/style.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{css/backstage/index.css}"/>
  </head>

  <body>
    <div id="index">
        <!-- 内容区 -->
        <div class="main_content">
          <div class="content_header">
            <a href="index.html" title="首页">
              <i class="icon icon-home"></i>首页
            </a>
            <a class="current" href="javascript:;">发布产品</a>
          </div>

          <div class="page_content">
            <div class="layui-tab">
              <ul class="layui-tab-title">
                <li	 tableurl="fbcp">内容管理</li>
                <li class="layui-this">发布内容</li>
                <!-- <li tableurl="fbcp">分类管理</li> -->
              </ul>
              <div class="layui-tab-content">
                <!-- 内容管理 -->
                <div class="layui-tab-item">
                    <div class="controls">
                      内容标题：
                      <input class="input-large" type="text" id="product_name">
                      <button class="btn btn-inverse">
                        <i class="icon-search icon-on-right bigger-110"></i>搜索
                      </button>
                      <a  class="btn btn-success">
                        <i class="icon-search icon-on-right bigger-110"></i>全部
                      </a>
                    </div>

                  <div class="layui-tab-content">
                      <table class="layui-table" lay-even lay-filter="productList">
                        <thead>
                          <tr>
                              <th lay-data="{checkbox:true}"><input type="checkbox" id="checkedAll" ></th>
                              <th lay-data="{field:'title'}">内容标题</th>
                              <th lay-data="{field:'img',width:'8%', align: 'center'}">缩略图</th>
                              <!-- <th lay-data="{field:'classify',width:'13%'}">简介</th> -->
                              <!-- <th lay-data="{field:'classify',width:'13%'}">类型</th> -->
                              <th lay-data="{field:'classify',width:'5%'}">排序</th>
                              <th lay-data="{field:'time',width:'10%', align: 'center'}">发布时间</th>
                              <th lay-data="{field:'opeartion',width:'13%', align: 'center'}">操作</th>
                          </tr>
                        </thead>
                        <tbody id="product_table_list">
                          <tr>
                            <td></td>
                              <td>
                                <input type="text" value="0" name="listorders[66]" placeholder="排序" style="width: 100%;height:24px">
                              </td>
                              <td>
                                <input type="text"  ="互动蹦床公园整体解决方案" name="" class="input_edit span10" style="height:24px;border: none;box-shadow: none;">
                              </td>
                              <td>
                                <img src="" style="width: 50px;height: 50px;">
                              </td>
                              <td>其他</td>
                              <td>2019-06-24</td>
                              <td>
                                <div class="btn-group">
                                  <a href="javascript:;" class="btn btn-mini btn-success check_leaveMessage" title="编辑">编辑</a>
                                  <a href="http://www.m3games.com/qita/show-66.html" class="btn btn-mini btn-inverse" title="预览">预览</a>
                                  <a href="javascript:;" class="btn btn-mini btn-delete delete_content" title="删除">删除</a>
                                </div>
                              </td>
                          </tr>
                        </tbody>
                      </table>
                      <div id="page"></div>

                      <button class="btn btn-small btn-info J_ajax_submit_btnconfirm" id="deleteAll">批量删除</button>
                  </div>

                </div>
                <!-- 发布内容 -->
                <div class="layui-tab-item layui-show">
                  <div  class="publicConten_form  layui-form" >
                  <input type="hidden" id="product_id">
                  	<div class="control-group" style="border-top: 0!important; display: none;">
                      <label class="control-label">
                        <i class="must_red">*</i>选择分类
                      </label>
                      <div class="controls">
                        <select id="typeId">
                          <option value="0">选择分类</option>
                          <option value="1">产品中心</option>
                        </select>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label">
                        <i class="must_red">*</i>产品标题
                      </label>
                      <div class="controls">
                        <input type="text" name="info[title]" value=""  id="product_fbcp_cpbt">
                        <span class="help-inline">建议不超过80个字符</span>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label"><i class="must_red">*</i>产品关键词</label>
                      <div class="controls">
                        <div class="tags" tabindex="1" id="product_fbcp_cpgjz">
                            <input class="form-field-tags" type="text" placeholder="请输入SEO关键词"   value="Tag Input Control" name="info[keywords]" style="display: none;">
                            <input type="text" placeholder="请输入SEO关键词" class="tags_enter" autocomplete="off" >
                        </div>
                        <span class="help-inline" style="margin-top: 10px;">建议填写1-3个关键词，每填写1个关键词请敲键盘上的“回车键”，系统智能生成产品关键词标签！</span>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label"><i class="must_red">*</i>SEO描述</label>
                      <div class="controls">
                        <textarea name="info[description]" id="product_fbcp_seomx"></textarea>
                        <span class="help-inline">建议不超过200个字符</span>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label"><i class="must_red">*</i>产品排序</label>
                      <div class="controls">
                        <input type="text"  value="1"  id="product_fbcp_sort"  style="width:80px;">
                        <span class="help-inline">按照从小到大排序，数字越小越靠前</span>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label"><i class="must_red">*</i>缩略图</label>
                      <div class="controls thumbnail_img">
                        <img src="images/upload-pic_128.png">
                        <div>
                          <input id="input_singleImg01" type="file" accept="image/*" style="width: 150px;border: none;box-shadow: none; background: none;" data-type="product"> 
                          <span class="help-inline" style="color:red;padding:5px 0 0 10px;float:left;">图片格式：jpg、jpeg、png、gif</span> 
                        </div>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label">产品banner图片</label>
                      <div class="controls">
                        <input class="image_priview" type="text" id="product_banner_filename" style="width: 180px;float: left;">
                        <input id="input_singleImg02" type="file" accept="image/*" style="width: 150px;border: none;box-shadow: none; background: none;" datatype="product"> 
                        <span class="help-inline" style="color:red;padding:5px 0 0 10px;float:left;">图片格式：jpg、jpeg、png、gif</span> 
                      	<span style="margin-left: 35px;font-size: 12px;">
                        	描述：<input type="text"  style="width:180px;" id="bannerImgLabel">
                        </span>
                      </div>
                    </div>
                    
                    <div class="control-group">
                      <label class="control-label">产品视频/图片</label>
                      <div class="controls">
                        <input class="image_priview" type="text" id="videoImg" style="width: 180px;float: left;">
                        <input id="input_singleImg03" type="file"  style="width: 150px;border: none;box-shadow: none; background: none;" datatype="product"> 
                        <span class="help-inline" style="color:red;padding:5px 0 0 10px;float:left;">文件格式：mp4、rmvb、3gb、wma、jpg、jpeg、png、gif</span> 
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label">视频/图片描述</label>
                      <div class="controls">
                        <textarea  id="videoText"></textarea>
                        <span class="help-inline">建议不超过200个字符</span>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label">产品图片</label>
                      <div class="controls">
                        <input class="image_priview" type="text" id="contentImg" style="width: 180px;float: left;">
                        <input id="input_singleImg04" type="file" accept="image/*" style="width: 150px;border: none;box-shadow: none; background: none;" datatype="product"> 
                        <span class="help-inline" style="color:red;padding:5px 0 0 10px;float:left;">图片格式：jpg、jpeg、png、gif</span>
                        <span style="margin-left: 35px;font-size: 12px;">
                        	描述：<input type="text"  style="width:180px;" id="contentImgLabel">
                        </span> 
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label">产品图片描述</label>
                      <div class="controls">
                      	<div id="contentText"> </div>
                        <!-- <textarea  id="contentText"></textarea> -->
                        <span class="help-inline">建议不超过200个字符</span>
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label">功能应用图片</label>
                      <div class="controls">
                        <input class="image_priview" type="text" id="functionImg" style="width: 180px;float: left;">
                        <input id="input_singleImg05" type="file" accept="image/*" style="width: 150px;border: none;box-shadow: none; background: none;" datatype="product"> 
                        <span class="help-inline" style="color:red;padding:5px 0 0 10px;float:left;">图片格式：jpg、jpeg、png、gif</span>
                        <span style="margin-left: 35px;font-size: 12px;">
                        	描述：<input type="text"  style="width:180px;" id="functionImgLabel">
                        </span> 
                      </div>
                    </div>
                    <div class="control-group">
                      <label class="control-label">功能应用描述</label>
                      <div class="controls">
                      	<div id="functionText"> </div>
                        <!-- <textarea  id="functionText"></textarea> -->
                        <span class="help-inline">建议不超过200个字符</span>
                      </div>
                    </div>
                     <div class="control-group">
                      <label class="control-label">应用领域</label>
                      
                      <div class="controls imgUpLeft">
                        <img src="images/upload-pic_128.png">
                        <span style="font-size: 12px;">
                        	描述：<input type="text" style="width:180px;" id="areaImgOneLabel">
                        </span>
                        <div>
                          <input id="input_singleImg06" type="file" accept="image/*" style="width: 150px;border: none;box-shadow: none; background: none;" datatype="product"> 
                        </div>
                      </div>
                      
                      <div class="controls imgUpRight">
                        <img src="images/upload-pic_128.png">
                        <span style="font-size: 12px;">
                        	描述：<input type="text" style="width:180px;" id="areaImgTowLabel">
                        </span>
                        <div>
                          <input id="input_singleImg07" type="file" accept="image/*" style="width: 150px;border: none;box-shadow: none; background: none;" datatype="product"> 
                        </div>
                      </div>
                      
                      <div class="controls imgBtLeft">
                        <img src="images/upload-pic_128.png">
                        <span style="font-size: 12px;">
                        	描述：<input type="text" style="width:180px;" id="areaImgThrLabel">
                        </span>
                        <div>
                          <input id="input_singleImg08" type="file" accept="image/*" style="width: 150px;border: none;box-shadow: none; background: none;" datatype="product"> 
                        </div>
                      </div>
                      
                      <div class="controls imgBtRight">
                        <img src="images/upload-pic_128.png">
                        <span style="font-size: 12px;">
                        	描述：<input type="text" style="width:180px;" id="areaImgFourLabel">
                        </span>
                        <div>
                          <input id="input_singleImg09" type="file" accept="image/*" style="width: 150px;border: none;box-shadow: none; background: none;" datatype="product"> 
                        </div>
                      </div>
                      
                    </div>
                    

                    <div class="form-actions">
                      <button class="btn btn-success"  onclick="insertUpdateProduct()">
                        <i class="icon-ok bigger-110"></i> 提交
                      </button>
                    </div>
                  </div>
                </div>
              </div>
            </div>

          </div>
        </div>
      <footer></footer>
    </div>

    <script type="text/javascript" th:src="@{libs/jquery-2.1.0.min.js}"></script>
<!--     配置文件
    <script type="text/javascript"  charset="utf-8"th:src="@{plugins/ueditor/ueditor.config.js}"></script>
    编辑器源码文件
    <script type="text/javascript" charset="utf-8"  th:src="@{plugins/ueditor/ueditor.all.js}"></script> -->
    <script type="text/javascript" th:src="@{libs/wangEditor.min.js}"></script>
    <script type="text/javascript" th:src="@{libs/base64.js}"></script>
    <script type="text/javascript" th:src="@{plugins/layui.js}" charset="utf-8"></script>
    <script type="text/javascript" th:src="@{js/backstage/style.js}" charset="utf-8"></script>
    <script type="text/javascript" th:src="@{js/backstage/product.js}"></script>
    <!-- 实例化编辑器 -->
    <script type="text/javascript">
    /*   var ue = UE.getEditor('container1');
    ue.ready(function() {
	        ue.setHeight(400);
   	});
    UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
    UE.Editor.prototype.getActionUrl = function(action) {
        if (action == 'uploadimage' || action == 'uploadscrawl' || action == 'uploadimage') {
            return '/productController/imgUploadProduct';		//上传图片地址
        } else {
            return this._bkGetActionUrl.call(this, action);
        }
    } */
     
    //产品图片描述
    var E = window.wangEditor;
    var editor1 = new E('#contentText');
    editor1.customConfig.defaultEditorAll = true;
    editor1.create(); 
    
    //功能应用图片
    var editor2 = new E('#functionText');
    editor2.customConfig.defaultEditorAll = true;
    editor2.create(); 
    

      // 添加相关产品弹窗
      layui.use(['layer','laypage','table'], function() {
        var layer = layui.layer,laypage = layui.laypage,table = layui.table;
        laypage.render({
          elem: 'dialog_page',
          count: 100,
          layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
          jump: function(obj) {
            // console.log(obj)
          }
        });

      })

      // 内容管理
      layui.use(['laypage','table','layer'], function(){
          var laypage = layui.laypage,
                  table = layui.table,
                  layer = layui.layer;
       })   
    </script>
  </body>

</html>